package com.spj.facory;

import com.spj.impl.Japanese;
import com.spj.dao.People;
import com.spj.impl.Chinese;

public class PeopleFactory {
    public People getPeople(String race) {
        if ("中国人".equals(race)) {
            return new Chinese();
        } else if ("日本人".equals(race)) {
            return new Japanese();
        } else {
            return null;
        }
    }
}
